package com.example.weight.navigation;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.example.weight.R;
import com.example.weight.greenSeasons.BangongShiyanYongdian;
import com.example.weight.greenSeasons.SolidLiquid.yongdian7_3;
import com.example.weight.greenSeasons.ZongbiaoYongdian;
import com.example.weight.greenSeasons.compost.duifeiyongdian;
import com.example.weight.greenSeasons.flocculation.xuningyongdian;
import com.example.weight.greenSeasons.waterDeal.UseElectricityTable;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;

public class GongyixianchangGegongxuyongdianNavigationActivity extends AppCompatActivity {

    private String name, factory;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gongyixianchang_gegongxuyongdian_nav);
        Intent previousIntent = getIntent();
        name = previousIntent.getStringExtra("name");
        factory = previousIntent.getStringExtra("factory");

        TitleBar titleBar = findViewById(R.id.titleBar);
        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }

            @Override
            public void onTitleClick(View v) {}

            @Override
            public void onRightClick(View v) {}
        });
    }
    public void turnGuyefenliYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, yongdian7_3.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }

    public void turnXuningYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, xuningyongdian.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnDuifeiYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, duifeiyongdian.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnShuichuliYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, UseElectricityTable.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnBangongShiyanYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, BangongShiyanYongdian.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnZongbiaoYongdian(View view) {
        Intent intent =new Intent(GongyixianchangGegongxuyongdianNavigationActivity.this, ZongbiaoYongdian.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }


}
